Electronic device and method for controlling state of components therein

ABSTRACT

An electronic device includes a cover, a main body, an angle measuring apparatus, a memory for storing working states of components of the electronic device; a presetting unit configured to preset relationship of predetermined working states of components in the electronic device and corresponding angle ranges between the main body and the cover; an angle measuring unit configured to control the angle measuring apparatus to detect current angle value between the main body and the cover; a state determining unit configured to determine the predetermined working state of components of the electronic device; a control unit configured to determine whether the current working state of the components is the same as the determined working state; and an updating unit configured to record the determined working state as the updated working state of the components when the current state of the components is different from the determined working state.

BACKGROUND

1. Technical Field

The disclosure relates to electronic devices, and particularly to anelectronic device capable of controlling state of its components and amethod for controlling state of components in the electronic device.

2. Description of Related Art

A touch switch is usually used in a notebook computer for changingworking states of the notebook computer through the operation of openingand closing the lid of the notebook computer, for example, turning offthe display screen or controlling the notebook computer to enter into asleep mode. Mode-switching is often achieved via closing the lid totouch with main body of the notebook computer. However, a touch switchoften has limited service life and can be easily damaged by repeatedclosings and openings of the lid.

Therefore, it is useful to provide an electronic device for controllingthe state of components in the electronic device to overcome theabove-mentioned shortcoming.

BRIEF DESCRIPTION OF THE DRAWINGS

The components in the drawing are not necessarily drawn to scale, theemphasis instead being placed upon clearly illustrating the principlesof the electronic device.

FIG. 1 is a schematic view of an electronic device in accordance with anexemplary embodiment.

FIG. 2 is a block diagram of the electronic device in FIG. 1.

FIG. 3 is a schematic, cross-sectional view of the electronic device inFIG. 1.

FIG. 4 is a method of controlling the electronic device in FIG. 1, inaccordance with an exemplary embodiment.

DETAILED DESCRIPTION

Referring to FIGS. 1-3, the electronic device 1 includes a cover 10, amain body 20 connected with the cover 10, a screen 30 disposed on thecover 10. The electronic device 1 further includes an angle measuringapparatus 33 for measuring an angle value between the cover 10 and themain body 20 in real time. The angle measuring apparatus 33 may bedisposed on the electronic device 1. The electronic device 1 may be anycollapsible electronic device, such as a notebook computer, or a PDA.

The electronic device 1 further includes a presetting unit 40, an anglemeasuring unit 50, a state determining unit 60, a control unit 70, amemory 80 and an updating unit 90.

The presetting unit 40 is configured for presetting relationship ofpredetermined working states of components in the electronic device 1and corresponding angle ranges. The components of electronic device 1may include a display screen, a CPU, or a keyboard. The memory 80 isused for storing a table recording the relationship of predeterminedworking states of components in the electronic device 1 andcorresponding angle ranges.

The following table uses the screen and the CPU for example toillustrate the present disclosure. If the angle value between the cover10 and the main body 20 is between the angle range of 30-40 degrees, thescreen 30 will be shut off, and the CPU will be kept on.

Angle range Screen CPU  0-30 off off 30-40 off on 40-60 off off  60-135on on 135-180 off on

The angle measuring unit 50 is configured to control the angle measuringapparatus 33 to detect current angle value between the main body 20 andthe cover 10. The state determining unit 60 is configured to determinethe angle range where the detected angle value is, and thereby determinethe predetermined working state of components of the electronic device 1in the table.

The control unit 70 is configured to control the components of theelectronic device 1 to work according to a current working state. Thecontrol unit 70 is also configured to determine whether the currentworking state of the components is the same as the determined workingstate in the table. If not, the control unit 70 sends a control signalto the updating unit 90. For example, if the determined working state ofthe component is on, but the current working state of the componentshould be off based on the pre-determined settings, then the controlunit 70 sends the control signal to the updating unit 90.

The updating unit 90 is configured to record the determined workingstate as the updated working state of the components based on thecontrol signal from the control unit 70 when the current state of thecomponents are different from the determined working state. The controlunit 70 is further configured to control the components of theelectronic device 1 to work according to the updated working state.

The angle value between the cover 10 and the main body 20 may bedetermined by following two ways. In the first way, the angle measuringapparatus 33 includes a first sensor 301 and a second sensor 303. Thefirst sensor 301 is disposed on the main body 20 for sensing angle αbetween the main body 20 and ground. The second sensor 303 is disposedon the cover 10 for sensing angle β between the cover 10 and ground,thereby the value of angle θ is calculated by the angle α and the angleβ. The first sensor 301 and the second sensor 303 may be G-sensors.

In the second way, the angle measuring apparatus 33 includes at leastone infrared emitter 301 a and at least one infrared receiver 303 b. Thefollowing takes one infrared emitter 301 a disposed on the cover 10 andone infrared receiver 303 b disposed on the main body 20 for example.The infrared emitter 301 a and one infrared receiver 303 b are disposedon one cross-section. Distance h between the infrared emitter 301 a andthe receiver 302 b can be measured, distance a between the infraredemitter 301 a and an axis of an axle connecting the cover 10 and themain body 20 is predetermined when the infrared emitter 301 a isdisposed, and distance b between the infrared receiver 303 b and theaxis is predetermined when the infrared receiver 303 b is disposed. Thevalue of angle θ is calculated by a, b and h.

FIG. 4 is a method of controlling the electronic device in FIG. 1. Instep S100, the memory 80 records the relationship of the predeterminedworking states of components in the electronic device 1 andcorresponding angle in the table by the presetting unit 40.

In step S102, the angle measuring apparatus 33 detects the value ofangle θ in real time.

In step S104, the determining unit 60 determines the angle range wherethe detected angle value is, and thereby determine the predeterminedworking state of components of the electronic device 1 in the table.

In step S106, the control unit 70 determines whether the current workingstate of the components is the same as the determined working state inthe table. If they are not the same, the control unit 70 sends controlsignal to the updating unit 90. If they are the same, the control unit70 keeps the components of the electronic device 1 to work according tocurrent working state.

In step S108, the updating unit 90 records the determined working stateas the updated working state of the components when the current state ofthe components are different from the determined working state. Thecontrol unit 70 controls the components of the electronic device 1 towork according to the updated working state.

It is believed that the present embodiments and their advantages will beunderstood from the foregoing description, and it will be apparent thatvarious changes may be made thereto without departing from the spiritand scope of the disclosure or sacrificing all of its materialadvantages, the examples hereinbefore described merely being preferredor exemplary embodiments of the present disclosure.

1. An electronic device comprising: a cover, a main body connected withthe cover, an angle measuring apparatus and a memory for storing workingstates of components of the electronic device; a presetting unitconfigured to preset relationship of predetermined working states ofcomponents in the electronic device and corresponding angle rangesbetween the main body and the cover; an angle measuring unit configuredto control the angle measuring apparatus to detect current angle valuebetween the main body and the cover; a state determining unit configuredto determine the angle range where the detected angle value is in, andthereby determine the predetermined working state of components of theelectronic device; a control unit configured to determine whether thecurrent working state of the components is the same as the determinedworking state; and an updating unit configured to record the determinedworking state as the updated working state of the components when thecurrent state of the components is different from the determined workingstate.
 2. The electronic device of claim 1, wherein the memory isfurther for storing a table recording the relationship of predeterminedworking states of components in the electronic device and thecorresponding angle ranges between the main body and the cover.
 3. Theelectronic device of claim 1, wherein the angle measuring apparatuscomprises a first sensor and a second sensor, the first sensor isdisposed on the main body for sensing angle α between the main body andground, the second sensor is disposed on the cover for sensing angle βbetween the cover and ground, thereby the value of angle θ is calculatedby the angle α and the angle β.
 4. The electronic device of claim 3,wherein the first sensor and the second sensor are G-sensors.
 5. Theelectronic device of claim 1, wherein the angle measuring apparatuscomprises one infrared emitter disposed on the cover, one infraredreceiver disposed on the main body, and the infrared emitter and theinfrared receiver are disposed on one cross-section, distance h betweenthe infrared emitter and the receiver is measured in real time, distancea between the infrared emitter and an axis of an axle connecting thecover and the main body is predetermined when the infrared emitter isdisposed, and distance b between the infrared receiver and the axis ispredetermined when the infrared receiver is disposed, and angle θ iscalculated by a, b and h.
 6. A method for controlling an electronicdevice, the method comprising: presetting relationship of predeterminedworking states of components in the electronic device and correspondingangle ranges between the main body and the cover; detecting currentangle value between a main body and a cover of the electronic device;determining the angle range where the detected angle value is in, andthereby determine the predetermined working state of components of theelectronic device; determining whether the current working state of thecomponents is the same as the determined working state; and recordingthe determined working state as the updated working state of thecomponents when the current state of the components are different fromthe determined working state.
 7. The method according to claim 6,wherein the method further comprises controlling the components of theelectronic device to work according to the updated working state.
 8. Themethod according to claim 6, wherein the method further compriseskeeping the components of the electronic device to work according tocurrent working state when the current state of the components are thesame as the determined working state.
 9. The method according to claim6, wherein the method further comprises disposing a first sensor on themain body for sensing angle α between the main body and ground, a secondsensor on the cover for sensing angle β between the cover and ground andcalculating value of angle θ by the angle α and the angle β.
 10. Themethod according to claim 6, wherein the method further comprises:disposing one infrared emitter disposed on the cover, one infraredreceiver on the main body, and the infrared emitter and the infraredreceiver on one cross-section; measuring distance h between the infraredemitter and the receiver in real time; obtaining distance a between theinfrared emitter and an axis of an axle connecting the cover and themain body which is predetermined when the infrared emitter is disposed,and distance b between the infrared receiver and the axis which ispredetermined when the infrared receiver is disposed; and calculatingangle θ is by a, b and h.